#include "Engine.h"

std::ofstream out("output.txt");

namespace TSS
{
	LogFile::LogFile() { }
	LogFile::~LogFile()
	{
		if(out.good()) out.close();
	}

	void LogFile::Print(std::string s)
	{
		out << s << std::endl;
	}

	void LogFile::Print(char c[])
	{
		out << c << std::endl;
	}

	std::ofstream& LogFile::operator<<(char c[])
	{
		out << c;
		return out;
	}

	std::ofstream& LogFile::operator<<(std::string s)
	{
		out << s;
		return out;
	}

	std::ofstream& LogFile::operator<<(double d)
	{
		out << d;
		return out;
	}

	std::ofstream& LogFile::operator<<(float f)
	{
		out << f;
		return out;
	}

	std::ofstream& LogFile::operator<<(int i)
	{
		out << i;
		return out;
	}

	std::ofstream& LogFile::operator<<(bool b)
	{
		(b) ? out << "True" : out << "False";
		return out;
	}
};